#ifndef _BG_WAYPOINT_H_
#define _BG_WAYPOINT_H_

#include "math/vec2.h"
namespace LuaPlus
{
    class LuaState;
}


namespace background
{
class BGWaypoint
{
public:
	BGWaypoint(int ID) { m_ID = ID; };
	~BGWaypoint()		{};
	void				SetPos(const math::Vec2& Pos) { m_Pos = Pos; };
	const math::Vec2&	GetPos() const { return m_Pos; }; 
	void				RenderDebug(const math::Vec2& Offset, float	Scale);
	static void			RenderDebugPos(const math::Vec2& ScreenPos, int ID = -1);
	int					GetID() const { return m_ID; };
	bool				IsInside(const math::Vec2& Pos, const math::Vec2& Offset);
	static int			Sort(BGWaypoint* pA, BGWaypoint* pB) {  return pA->GetID() - pB->GetID(); };
	static	void		Register(LuaPlus::LuaState* _pScript);
private:
	math::Vec2			m_Pos;
	int					m_ID;
};

} // namespace background


#endif // _BG_WAYPOINT_H_